package com.usian.mapper;

import com.usian.district.District;
import com.usian.appointments.Appointments;
import com.usian.order.Order;
import com.usian.travelSchedule.ScenicSpotInfo;
import com.usian.travelSchedule.TravelSchedule;
import com.usian.travelSchedule.Vo.TravelScheduleVO;
import com.usian.vo.Result;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 米西米西
 */
@Mapper
public interface TravelScheduleMapper {


    List<TravelSchedule> selectTravel(Integer id);

    List<ScenicSpotInfo> selectScenicSpotInfo(Integer detailedScheduleId);

    Integer calculateDurationDays(Integer id);

    ScenicSpotInfo selectScenicSpotInfoById(Integer id);

    List<Appointments> selectAppointments(Integer id);

    int deleteAppointment(Integer id);

    Integer insert(TravelSchedule travelSchedule);

    int add(Appointments appointments);

    @Insert("insert into tb_order(user_id,address,order_status,status,amount,address_id,category,communication,time) values(#{userId},null,#{orderStatus},#{status},#{amount},#{addressId},#{category},#{communication},#{time})")
    Integer insertorder(Order order);

    TravelSchedule selectTrav(String name);

    int deleteTravelSchedule(Integer id);

}
